<div style='color:Blue'> <p>If you are willing to get more, you will get more.</p> </div>Trial 1: Let's try the above example, with the following. (Copy, Paste, Submit)
<style> selector { property: ...; ... } </style>
.target-1, p
div > p
ul#menu li
#name ~ a
<div ???='color:Blue; position:relative; left:50px'> Test <p id='test-paragraph-1'>Hmmmm</p> <!-- What color? Position? --> </div>Trial 2: Let's try the above example, with the following. You can also test the example using http://cs.tru.ca/~mlee/comp3540/Software/runcode.php.
document
, in [client-side] JavaScript code.window
, in [client-side] JavaScript code.(document.getElementById('test-paragraph-2')).style.color = 'Red'; // an HTML DOM objectTrial 3: Let's try the above example, with the following.
<button type='button' onclick='show();'>Show</button>
, ordocument.getElementById(id).addEventListener(event, eventlistener);